package cn.edu.sgu.www.mhxysy.service.chongwu_shizhuang;

import cn.edu.sgu.www.mhxysy.dto.chongwu_shizhuang.ChongwuShizhuangDTO;
import cn.edu.sgu.www.mhxysy.entity.chongwu_shizhuang.ChongwuShizhuang;
import cn.edu.sgu.www.mhxysy.pager.Pager;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
public interface ChongwuShizhuangService {

    /**
     * 计算评分
     * @param shizhuangId 宠物时装ID
     */
    void compute(String shizhuangId);

    /**
     * 穿戴宠物时装
     * @param chongwuId 宠物ID
     * @param shizhuangId 宠物时装ID
     */
    @Transactional(rollbackFor = Exception.class)
    void wear(String chongwuId, String shizhuangId);

    void insert(ChongwuShizhuangDTO chongwuShizhuangDTO);

    void deleteById(String id);

    void updateById(ChongwuShizhuangDTO chongwuShizhuangDTO);

    List<ChongwuShizhuang> selectAll();

    ChongwuShizhuang selectById(String id);

    List<ChongwuShizhuang> selectByChongwuId(Integer chongwuId);

    Page<ChongwuShizhuang> selectByPage(Pager<ChongwuShizhuang> pager);
}